<?php 

/**
 * 后台用户模型
 */
class AdminModel extends Model{
	
    public $table = 'admin';
    
    public $auto = array(
		array('logintime', 'time', 'function', 2, 3),
		array('loginip', '_loginip', 'method', 2, 3),
	);
	
	public function _loginip($value){
	   return $_SERVER['REMOTE_ADDR'];
	}
    
    public $validate = array();
    
    public function updateData($aid){
        if (!$this->create()) return false;
		$this->data['aid'] = $aid;
		$this->update();
		return true;
    }
	
 }
 
 
 
 
 
 
 
 
 
 
 


 ?>